From 59b4254d5965ccab2526cf80494924f2b8f4a9f8 Mon Sep 17 00:00:00 2001 From: Jim Blandy Date: Tue, 4 May 1993 02:34:26 +0000 Subject: [PATCH] * lisp.h (CHAR_ALT, CHAR_SUPER, CHAR_HYPER): New constants, in case we need them. * termhooks.h (alt_modifier, super_modifier, hyper_modifier, shift_modifier, ctrl_modifier, meta_modifier): Define these in terms of the CHAR_mumble macros, to avoid having the same thing defined in two places. Arrange for Fy_or_n_p to put off switch-frame events. * lread.c (read_filtered_char): New function, which contains the code which used to be in Fread_char, Fread_event, and Fread_char_exclusive; there was a lot of common code. (Fread_char, Fread_event, Fread_char_exclusive): Rewrite in terms of read_filtered_char. * lisp.h (read_filtered_char): Declare this extern here. * fns.c (Fy_or_n_p): Call read_filtered_char, arranging to delay switch-frame events. Make the modifier manipulation functions more robust. The old way caused a bug once, and probably would again. * termhooks.h (alt_modifier, super_modifier, hyper_modifier, shift_modifier, ctrl_modifier, meta_modifier): Shift these all down one bit in value, to avoid sign extension problems. * lisp.h (CHAR_META, CHAR_CTL, CHAR_SHIFT): Fix these definitions too. * keyboard.c (lispy_modifier_list): Ignore modifier bits beyond what our table of modifier names can handle. (apply_modifiers): Don't abort if you see extra modifier bits, just remove them. * lisp.h (Qrange_error, Qdomain_error, Qsingularity_error, Qoverflow_error, Qunderflow_error): Add extern to these declarations. --- src/lisp.h | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/lisp.h b/src/lisp.h index 57a6a2f5092..7f08159a145 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -569,11 +569,13 @@ typedef unsigned char UCHAR; #define COMPILED_DOC_STRING 4 #define COMPILED_INTERACTIVE 5 -/* Flag bits in a character. */ - -#define CHAR_META 0x800000 -#define CHAR_CTL 0x400000 -#define CHAR_SHIFT 0x200000 +/* Flag bits in a character. These also get used in termhooks.h. */ +#define CHAR_ALT (0x020000) +#define CHAR_SUPER (0x040000) +#define CHAR_HYPER (0x080000) +#define CHAR_SHIFT (0x100000) +#define CHAR_CTL (0x200000) +#define CHAR_META (0x400000) /* Data type checking */ @@ -936,8 +938,8 @@ extern Lisp_Object Qinvalid_function, Qwrong_number_of_arguments, Qno_catch; extern Lisp_Object Qend_of_file, Qarith_error; extern Lisp_Object Qbeginning_of_buffer, Qend_of_buffer, Qbuffer_read_only; -Lisp_Object Qrange_error, Qdomain_error, Qsingularity_error; -Lisp_Object Qoverflow_error, Qunderflow_error; +extern Lisp_Object Qrange_error, Qdomain_error, Qsingularity_error; +extern Lisp_Object Qoverflow_error, Qunderflow_error; extern Lisp_Object Qintegerp, Qnumberp, Qnatnump, Qsymbolp, Qlistp, Qconsp; extern Lisp_Object Qstringp, Qarrayp, Qsequencep, Qbufferp; @@ -1041,6 +1043,7 @@ extern Lisp_Object Vobarray, Vstandard_input; extern Lisp_Object Fread (), Fread_from_string (); extern Lisp_Object Fintern (), Fintern_soft (), Fload (); extern Lisp_Object Fget_file_char (), Fread_char (); +extern Lisp_Object read_filtered_event (); extern Lisp_Object Feval_current_buffer (), Feval_region (); extern Lisp_Object intern (), oblookup (); #define LOADHIST_ATTACH(x) \ -- 2.30.2